package com.p2p.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.p2p.model.entity.Logininfo;
import com.p2p.system.mapper.LogininfoMapper;
import com.p2p.system.service.LogininfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 罗永东
 * @since 2023-12-07
 */
@Service
public class LogininfoServiceImpl extends ServiceImpl<LogininfoMapper, Logininfo> implements LogininfoService {

    @Autowired
    private LogininfoMapper logininfoMapper;

    @Override
    public Logininfo getUserByPhone(String phone) {


        return this.baseMapper.selectByPhone(phone);
    }

    @Override
    public String getPasswordById(Long id) {
        return this.baseMapper.getUserOldPassword(id);
    }
}
